package com.hdy.javachatroomdemo.factory;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hdy.javachatroomdemo.Model.MessageRequest;
import com.hdy.javachatroomdemo.Model.User;
import com.hdy.javachatroomdemo.constant.Constants;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;

public abstract class AbstractMessageTransfer implements IMessageTransfer {
    @SneakyThrows
    @Override
    public void send(MessageRequest request,User user) {
        sendMessage( request, user);
    }

    public abstract void sendMessage(MessageRequest request,User user) throws JsonProcessingException;

}
